
class test1:
    animations = {}

    @classmethod
    def register(cls, name):

        def wrapper(Manager):
            if name not in cls.animations:
                cls.animations[name] = Manager
            return Manager

        return wrapper


@test1.register(1)
class demo1(test1):
    def __init__(self):
        super().__init__()

@test1.register(2)
class demo2(test1):
    def __init__(self):
        super().__init__()

test = test1()
print(test.animations)